<template>
  <div class="son">
    <h1>Son组件: appCar: {{ appCar.name }} -- {{ appCar.price }}</h1>

  </div>
</template>

<script>
import { inject } from 'vue'
export default {
  name: 'Son-Comp',
  setup() {
    let appCar = inject('app-car');
    return {
      appCar
    }
  }
}
</script>

<style>
.son {
  background-color: orange;
  padding: 20px;
}
</style>
